package com.iflytek.top1;

import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

public class BestGroupingComparator extends WritableComparator {

    protected BestGroupingComparator(){
        super(BestBean.class,true);
    }

    @Override
    public int compare(WritableComparable a, WritableComparable b) {
        BestBean aBean = (BestBean) a;
        BestBean bBean = (BestBean) b;

        return aBean.getType().compareTo(bBean.getType());
    }
}